﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class DownloadBLL
    {
        DownloadDAO fdo = new DownloadDAO();
        public DownloadBLL() { }
        public bool Add(Download down)
        {
            return fdo.Add(down);
        }
        public Download GetDownloadById(int id)
        {
            return fdo.GetDownloadById(id);
        }
        public IList<Download> GetAllDownload()
        {
            return fdo.GetAllDownload();
        }
        public bool ModifyDownload(Download down)
        {
            return fdo.ModifyDownload(down);
        }
        public bool DeleteDownloadById(int id)
        {
            return fdo.DeleteDownloadById(id);
        }
        /// <summary>
        /// 根据类别查询集合
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public IList<Download> GetDownloadByTypeId(int type, int pageSize, int currentIndex)
        {
            return fdo.GetDownloadByUserId(type, pageSize, currentIndex);
        }
        public int GetTotal(int type)
        {
            return fdo.GetTotal(type);
        }
        public IList<Download> GetDownloadByType(int typeId)
        {
            return fdo.GetDownloadByType(typeId);
        }
    }
}
